# def merge(a,b,c):
#     i=j=0
#     k=0
#     while i<m and j<n:
#         if a[i]<=b[j]:
#             c[k]=a[i]
#             i+=1
#         else:
#             c[k]=b[j]
#             j+=1
#         k+=1
#     while i<m:
#         c[k]=a[k]
#         i+=1
#         k+=1
#     while j<n:
#         c[k]=b[j]
#         j+=1
#         k+=1
        
def merge(a,b,c):
    i=j=0
    k=0
    while i<m:
        c[k]=a[i]
        i+=1
        k+=1
    while j<n:
        c[k]=b[j]
        j+=1
        k+=1
    bulle_sort(c)

def bulle_sort(arr):
    l = len(arr)
    for i in range(l-1):
        for j in range(0,l-i-1):
            if arr[j]>arr[j+1]:
                arr[j],arr[j+1]=arr[j+1],arr[j]



m,*a=(4,3,5,8,11)
n,*b=(7,2,6,8,15,9999,108,20)
c=[0]*(m+n)
merge(a,b,c)
print(*c)